namespace ext.form
{
	using System;
	using System.Runtime.CompilerServices;
	using System.Html;
	using System.Collections;
	
	
	/// <summary>
	/// Composite field allowing a number of form Fields to be rendered on the same row. The fields are rendered
	/// using an hbox layout internally, so all of the normal HBox layout config items are available. Example usage:
	/// 
	/// {
	/// xtype: &apos;compositefield&apos;,
	/// labelWidth: 120
	/// items: [
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;Title&apos;,
	/// width : 20
	/// },
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;First&apos;,
	/// flex : 1
	/// },
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;Last&apos;,
	/// flex : 1
	/// }
	/// ]
	/// }
	/// 
	/// In the example above the composite&apos;s fieldLabel will be set to &apos;Title, First, Last&apos; as it groups the fieldLabels
	/// of each of its children. This can be overridden by setting a fieldLabel on the compositefield itself:
	/// 
	/// {
	/// xtype: &apos;compositefield&apos;,
	/// fieldLabel: &apos;Custom label&apos;,
	/// items: [...]
	/// }
	/// 
	/// Any Ext.form.* component can be placed inside a composite field.
	/// </summary>
	/// <htmlSummary>
	/// Composite field allowing a number of form Fields to be rendered on the same row. The fields are rendered
	/// using an hbox layout internally, so all of the normal HBox layout config items are available. Example usage:
	/// &lt;pre&gt;
	/// {
	/// xtype: &apos;compositefield&apos;,
	/// labelWidth: 120
	/// items: [
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;Title&apos;,
	/// width : 20
	/// },
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;First&apos;,
	/// flex : 1
	/// },
	/// {
	/// xtype : &apos;textfield&apos;,
	/// fieldLabel: &apos;Last&apos;,
	/// flex : 1
	/// }
	/// ]
	/// }
	/// &lt;/pre&gt;
	/// In the example above the composite&apos;s fieldLabel will be set to &apos;Title, First, Last&apos; as it groups the fieldLabels
	/// of each of its children. This can be overridden by setting a fieldLabel on the compositefield itself:
	/// &lt;pre&gt;
	/// {
	/// xtype: &apos;compositefield&apos;,
	/// fieldLabel: &apos;Custom label&apos;,
	/// items: [...]
	/// }
	/// &lt;/pre&gt;
	/// Any Ext.form.* component can be placed inside a composite field.
	/// </htmlSummary>
	/// <definedin>src\widgets\form\CompositeField.js</definedin>
	[ScriptName("CompositeField")]
	[ScriptNamespace("Ext.form")]
	[Imported()]
	public partial class CompositeField : ext.form.Field
	{
		
		#region Constructors
		public CompositeField(ext.form.CompositeField_Configuration config)
		{
		}
		
		/// <summary>Constructor</summary>
		public CompositeField()
		{
		}
		#endregion
		
		#region Fields
		/// <summary>The string to use when joining segments of the built label together (defaults to &apos;, &apos;)</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("labelConnector")]
		public string LabelConnector;
		
		/// <summary>Any default properties to assign to the child fields.</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("defaults")]
		public object Defaults;
		#endregion
		
		#region Properties
		/// <summary>The margins to apply by default to each field in the composite</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("defaultMargins")]
		[IntrinsicProperty()]
		public string DefaultMargins
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>If true, the defaultMargins are not applied to the last item in the composite field set (defaults to true)</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("skipLastItemMargin")]
		[IntrinsicProperty()]
		public bool SkipLastItemMargin
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>Signifies that this is a Composite field</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("isComposite")]
		[IntrinsicProperty()]
		public bool IsComposite
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>True to combine errors from the individual fields into a single error message at the CompositeField level (defaults to true)</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("combineErrors")]
		[IntrinsicProperty()]
		public bool CombineErrors
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>
		/// MixedCollection of current errors on the Composite&apos;s subfields. This is used internally to track when
		/// to show and hide error messages at the Composite level. Listeners are attached to the MixedCollection&apos;s
		/// add, remove and replace events to update the error icon in the UI as errors are added or removed.
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("fieldErrors")]
		[IntrinsicProperty()]
		public ext.util.MixedCollection FieldErrors
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>Internal collection of all of the subfields in this Composite</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("items")]
		[IntrinsicProperty()]
		public ext.util.MixedCollection Items
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		
		/// <summary>A container configured with hbox layout which is responsible for laying out the subfields</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("innerCt")]
		[IntrinsicProperty()]
		public ext.Container InnerCt
		{
			get
			{
				throw new System.Exception("Imported - not implemented");
			}
			set
			{
			}
		}
		#endregion
		
		#region Methods
		/// <summary>
		/// Called if combineErrors is true and a subfield&apos;s markInvalid method is called.
		/// By default this just adds the subfield&apos;s error to the internal fieldErrors MixedCollection
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <param name="field">The field that was marked invalid</param>
		/// <param name="message">The error message</param>
		[ScriptName("onFieldMarkInvalid")]
		public void OnFieldMarkInvalid(ext.form.Field field, string message)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Called if combineErrors is true and a subfield&apos;s clearInvalid method is called.
		/// By default this just updates the internal fieldErrors MixedCollection.
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <param name="field">The field that was marked invalid</param>
		[ScriptName("onFieldClearInvalid")]
		public void OnFieldClearInvalid(ext.form.Field field)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Performs validation checks on each subfield and returns false if any of them fail validation.</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <returns>False if any subfield failed validation</returns>
		[ScriptName("validateValue")]
		public bool ValidateValue()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Takes an object containing error messages for contained fields, returning a combined error
		/// string (defaults to just placing each item on a new line). This can be overridden to provide
		/// custom combined error message handling.
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <param name="errors">Array of errors in format: [{field: &apos;title&apos;, error: &apos;some error&apos;}]</param>
		/// <returns>The combined error message</returns>
		[ScriptName("buildCombinedErrorMessage")]
		public string BuildCombinedErrorMessage(System.Array errors)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Sorts the internal fieldErrors MixedCollection by the order in which the fields are defined.
		/// This is called before displaying errors to ensure that the errors are presented in the expected order.
		/// This function can be overridden to provide a custom sorting order if needed.
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("sortErrors")]
		public void SortErrors()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Resets each field in the composite to their previous value</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("reset")]
		public void Reset()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Calls clearInvalid on all child fields. This is a convenience function and should not often need to be called
		/// as fields usually take care of clearing themselves
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		[ScriptName("clearInvalidChildren")]
		public void ClearInvalidChildren()
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>
		/// Builds a label string from an array of subfield labels.
		/// By default this just joins the labels together with a comma
		/// </summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <param name="segments">Array of each of the labels in the composite field&apos;s subfields</param>
		/// <returns>The built label</returns>
		[ScriptName("buildLabel")]
		public string BuildLabel(System.Array segments)
		{
			throw new System.Exception("Imported - not implemented");
		}
		
		/// <summary>Checks each field in the composite and returns true if any is dirty</summary>
		/// <definedin>src\widgets\form\CompositeField.js</definedin>
		/// <returns>True if any field is dirty</returns>
		[ScriptName("isDirty")]
		public bool IsDirty()
		{
			throw new System.Exception("Imported - not implemented");
		}
		#endregion
	}
}
